﻿using System;

namespace SSM.BusinessLayer.Monitors
{
	public abstract class BaseMonitor
	{
        #region Properties

		public Single LastValue { get; set; }
		public DateTime LastCheck { get; set; }
        public Object Tag { get; set; }

		public String Category
		{
			get
			{
				String title = Title;

				for (Int32 i = 1; i < title.Length; i++)
				{
					if (Char.IsUpper(title, i))
					{
						return title.Substring(0, i);
					}
				}

				return title;
			}
		}
        
		#endregion

		#region Abstract members
        
		public abstract String Title { get; }
		public abstract Single GetNextValue();
        
		#endregion
	}
}